﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/List.Master" AutoEventWireup="true" CodeBehind="BatchReport.aspx.cs" Inherits="Honestysoft.Financing.WebUI.Module.Reports.BatchReport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript" src="../../Scripts/table.js"></script>
    <script language="javascript" type="text/javascript">
        function checkPrint() {
            if (document.getElementById("<%=txtDocNo.ClientID %>").value == "") {
                alert("请输入报告文号！");
                return;
            }
            if(document.getElementById("<%=dtpDocDate.ClientID %>").value == ""){
                alert("请选择报告日期！");
                return;
            }
            var dll = document.getElementById("<%=ddlBatchNo.ClientID %>");
            var batchId = dll.options[dll.selectedIndex].value;
            var batchNo = dll.options[dll.selectedIndex].text;
            var docDate = document.getElementById("<%=dtpDocDate.ClientID %>").value;
            window.open("BatchReportPrint.aspx?BatchID=" + batchId + "&BatchNo=" + batchNo + "&DocDate=" + escape(docDate) + "&DocNo=" + escape(document.getElementById("<%=txtDocNo.ClientID %>").value));
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="query_area">
		批次：<asp:DropDownList runat="server" ID="ddlBatchNo" CssClass="input2" Width="80px"
            AutoPostBack="True" onselectedindexchanged="ddlBatchNo_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp;
        <asp:Button runat="server" ID="btnReport" Text="生成报告" OnClientClick="checkPrint();return false;" CssClass="btn_normal"  onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'"/>
    </div>   
    <div>
        <table cellpadding="0" width="100%" cellspacing="0" border="1" class="tEdit" style="border-bottom:0px;margin-top:2px;">
            <th style="border-bottom:0px">关于对融资项目第<asp:Label Text="" ID="lblBatch" runat="server"></asp:Label>批资金支付申请初审的情况报告
</th>
        </table>
        <table cellpadding="0" width="100%" cellspacing="0" border="1" class="tEdit">
		<tr>
			<td style="width:100px;" class="title1">文号</td>
			<td><asp:TextBox ID="txtDocNo" runat="server" cssClass="input2" Width="96%"></asp:TextBox></td>
            <td style="width:100px;" class="title1">报告日期</td>
			<td><asp:TextBox ID="dtpDocDate" runat="server" cssClass="input2" onfocus="setday(this);" Width="96%"></asp:TextBox></td>
            <td></td>
            <td></td>
		</tr>
		<tr>
			<td class="title1">审核情况</td>
			<td colspan="5">
                <table cellpadding="0" width="100%" cellspacing="0" border="1" class="t1" id="tGrid">
		            <thead>  
                        <th align="center" width="40px">序号</th>
                        <th align="center">建设单位</th>
                        <th align="center">项目名称</th>
                        <th align="center">合同名称</th>
                        <th align="center"width="120px">作业表编号</th>
                        <th align="center"width="120px">申请金额</th>  
                        <th align="center"width="120px">初审金额</th>  
      	            </thead>           
		            <asp:Repeater runat="server" ID="rptList">
			            <ItemTemplate>
				            <tr>
                                <td><%#  Container.ItemIndex+ 1%>
                                </td>
                                <td style="text-align:left"><%#  DataBinder.Eval(Container.DataItem,"OwnerName") %></td>
					            <td style="text-align:left"><%#  DataBinder.Eval(Container.DataItem,"ProjectName") %></td>
					            <td style="text-align:left"><%#  DataBinder.Eval(Container.DataItem,"ContractName") %></td>
					            <td><%#  DataBinder.Eval(Container.DataItem,"Code") %></td>
                                <td style="text-align:right"><%# string.Format("{0:N}", DataBinder.Eval(Container.DataItem, "Amount_DocRec_S"))%></td>
                                <td style="text-align:right"><%#  string.Format("{0:N}", DataBinder.Eval(Container.DataItem,"Amount_S")) %></td>
				            </tr>  
			            </ItemTemplate>
		            </asp:Repeater>
                    <tr>
                        <td>合计</td>
                        <td><asp:Label Text="" ID="lblOwner" runat="server"></asp:Label>个建设单位</td>
                        <td><asp:Label Text="" ID="lblProject" runat="server"></asp:Label>个项目</td>
                        <td><asp:Label Text="" ID="lblContract" runat="server"></asp:Label>份合同</td>
                        <td><asp:Label Text="" ID="lblCode" runat="server"></asp:Label>笔请款</td>
                        <td style="text-align:right"><asp:Label Text="" ID="lblSumDocRec" runat="server"></asp:Label></td>
                        <td style="text-align:right"><asp:Label Text="" ID="lblSumAmountS" runat="server"></asp:Label></td>
                    </tr>
                </table>
            </td>
		</tr>
        </table>
    </div>
    
        <script language="javascript" type="text/javascript">
            uniteTable(tGrid, 4);
        </script>
</asp:Content>
